class FactoryProductionCapacityModel {
  String id;
  String caijian;
  String zhengjian;
  String kunbaoliu;
  String danjianliu;
  String zongrenshu;

  FactoryProductionCapacityOptionsModel  selectModel;
  List<FactoryProductionCapacityOptionsModel> options;

  FactoryProductionCapacityModel(
      {this.id,
      this.caijian,
      this.zhengjian,
      this.kunbaoliu,
      this.danjianliu,
      this.zongrenshu,
      
      this.options,this.selectModel});

  FactoryProductionCapacityModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    caijian = json['caijian'];
    zhengjian = json['zhengjian'];
    kunbaoliu = json['kunbaoliu'];
    danjianliu = json['danjianliu'];
    zongrenshu = json['zongrenshu'];
   
    if (json['options'] != null) {
      options = new List<FactoryProductionCapacityOptionsModel>();
      json['options'].forEach((v) {
        options.add(FactoryProductionCapacityOptionsModel.fromJson(v));
      });
    }
    if(json['richanliang'] != null){
       selectModel=FactoryProductionCapacityOptionsModel.fromJson(json['richanliang']);
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['caijian'] = this.caijian;
    data['zhengjian'] = this.zhengjian;
    data['kunbaoliu'] = this.kunbaoliu;
    data['danjianliu'] = this.danjianliu;
    data['zongrenshu'] = this.zongrenshu;
    
    if (this.options != null) {
      data['options'] = this.options.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class FactoryProductionCapacityOptionsModel {
  String id;
  String name;

  FactoryProductionCapacityOptionsModel({this.id, this.name});

  FactoryProductionCapacityOptionsModel.fromJson(Map<String, dynamic> json) {
    id = json['id'].toString();
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    return data;
  }
}
